package com.xm_jd.controller.dd;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xm_jd.utils.BaseServlet;


/**
 * Servlet implementation class index2_pj
 */
@WebServlet("/index2_pj")
public class index2_pj extends BaseServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public index2_pj() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		String ddid=request.getParameter("id");//订单id
		String time=request.getParameter("time");//订单时间
		String purl=request.getParameter("purl");//图片路径
		String ms=request.getParameter("ms");//商品描述
		String money=request.getParameter("money");//价格
		String spid=request.getParameter("spid");//商品id
		String yhid=request.getParameter("yhid");//用户id


		request.setAttribute("ddid", ddid);
		request.setAttribute("time", time);
		request.setAttribute("purl", purl);
		request.setAttribute("ms", ms);
		request.setAttribute("money", money);
		request.getSession().setAttribute("spid", spid);
		request.setAttribute("yhid", yhid);
		
		//request.getRequestDispatcher("jsps/dd/dd_pj.jsp").forward(request, response);
		this.forward("dd/dd_pj");
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
